cmake_minimum_required(VERSION 4.0)
project(cpp_demo  VERSION 1.0)

# 设置C++标准
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# 你的目标（可执行文件或库）
add_executable(cpp_demo main.cpp
        src/raii/raii.cpp
        include/raii.h
        src/container/vector_demo.cpp
        src/container/vector_demo.h
)

# 添加子目录
add_subdirectory(src)
add_subdirectory(src)
#add_subdirectory(tests)

# 安装规则
install(DIRECTORY include/ DESTINATION include)

## 设置可执行文件输出到 build/bin
#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
#
## 设置库文件输出到 build/lib
#set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
#set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)